import request from '@/utils/request'

// 查询所有餐车商品列表
export function listAllVehicleGoods() {
  return request({
    url: '/vehicle/goods/listAll',
    method: 'get'
  })
}

// 分页查询餐车商品列表
export function listVehicleGoods(query) {
  return request({
    url: '/vehicle/goods/pageList',
    method: 'get',
    params: query
  })
}

// 查询餐车商品详细
export function getVehicleGoods(id) {
  return request({
    url: '/vehicle/goods/query/' + id,
    method: 'get'
  })
}

// 新增餐车商品
export function addVehicleGoods(data) {
  return request({
    url: '/vehicle/goods/add',
    method: 'post',
    data: data
  })
}

// 修改餐车商品
export function updateVehicleGoods(data) {
  return request({
    url: '/vehicle/goods/edit',
    method: 'put',
    data: data
  })
}

// 删除餐车商品
export function delVehicleGoods(ids) {
  return request({
    url: '/vehicle/goods/remove/' + ids,
    method: 'delete'
  })
}

export function updateVehicleGoodsPrice(data) {
  return request({
    url: '/vehicle/goods/updateVehicleGoodsPrice',
    method: 'post',
    data
  })
}

export function updateVehicleGoodsStatus(data) {
  return request({
    url: '/vehicle/goods/updateVehicleGoodsStatus',
    method: 'post',
    data
  })
}
